Optimal. Leaf size=63 \[ \frac{121 (69 x+61)}{3875 \left (5 x^2+3 x+2\right )}-\frac{22}{125} \log \left (5 x^2+3 x+2\right )+\frac{4 x}{25}+\frac{41932 \tan ^{-1}\left (\frac{10 x+3}{\sqrt{31}}\right )}{3875 \sqrt{31}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0608414, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {1660, 1657, 634, 618, 204, 628} \[ \frac{121 (69 x+61)}{3875 \left (5 x^2+3 x+2\right )}-\frac{22}{125} \log \left (5 x^2+3 x+2\right )+\frac{4 x}{25}+\frac{41932 \tan ^{-1}\left (\frac{10 x+3}{\sqrt{31}}\right )}{3875 \sqrt{31}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1660
Rule 1657
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{\left (3-x+2 x^2\right )^2}{\left (2+3 x+5 x^2\right )^2} \, dx &=\frac{121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}+\frac{1}{31} \int \frac{\frac{4032}{25}-\frac{992 x}{25}+\frac{124 x^2}{5}}{2+3 x+5 x^2} \, dx\\ &=\frac{121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}+\frac{1}{31} \int \left (\frac{124}{25}+\frac{44 (86-31 x)}{25 \left (2+3 x+5 x^2\right )}\right ) \, dx\\ &=\frac{4 x}{25}+\frac{121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}+\frac{44}{775} \int \frac{86-31 x}{2+3 x+5 x^2} \, dx\\ &=\frac{4 x}{25}+\frac{121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}-\frac{22}{125} \int \frac{3+10 x}{2+3 x+5 x^2} \, dx+\frac{20966 \int \frac{1}{2+3 x+5 x^2} \, dx}{3875}\\ &=\frac{4 x}{25}+\frac{121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}-\frac{22}{125} \log \left (2+3 x+5 x^2\right )-\frac{41932 \operatorname{Subst}\left (\int \frac{1}{-31-x^2} \, dx,x,3+10 x\right )}{3875}\\ &=\frac{4 x}{25}+\frac{121 (61+69 x)}{3875 \left (2+3 x+5 x^2\right )}+\frac{41932 \tan ^{-1}\left (\frac{3+10 x}{\sqrt{31}}\right )}{3875 \sqrt{31}}-\frac{22}{125} \log \left (2+3 x+5 x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0308515, size = 59, normalized size = 0.94 \[ \frac{\frac{3751 (69 x+61)}{5 x^2+3 x+2}-21142 \log \left (5 x^2+3 x+2\right )+19220 x+41932 \sqrt{31} \tan ^{-1}\left (\frac{10 x+3}{\sqrt{31}}\right )}{120125} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 51, normalized size = 0.8 \begin{align*}{\frac{4\,x}{25}}-{\frac{11}{25} \left ( -{\frac{759\,x}{775}}-{\frac{671}{775}} \right ) \left ({x}^{2}+{\frac{3\,x}{5}}+{\frac{2}{5}} \right ) ^{-1}}-{\frac{22\,\ln \left ( 5\,{x}^{2}+3\,x+2 \right ) }{125}}+{\frac{41932\,\sqrt{31}}{120125}\arctan \left ({\frac{ \left ( 3+10\,x \right ) \sqrt{31}}{31}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.45998, size = 70, normalized size = 1.11 \begin{align*} \frac{41932}{120125} \, \sqrt{31} \arctan \left (\frac{1}{31} \, \sqrt{31}{\left (10 \, x + 3\right )}\right ) + \frac{4}{25} \, x + \frac{121 \,{\left (69 \, x + 61\right )}}{3875 \,{\left (5 \, x^{2} + 3 \, x + 2\right )}} - \frac{22}{125} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.997507, size = 252, normalized size = 4. \begin{align*} \frac{96100 \, x^{3} + 41932 \, \sqrt{31}{\left (5 \, x^{2} + 3 \, x + 2\right )} \arctan \left (\frac{1}{31} \, \sqrt{31}{\left (10 \, x + 3\right )}\right ) + 57660 \, x^{2} - 21142 \,{\left (5 \, x^{2} + 3 \, x + 2\right )} \log \left (5 \, x^{2} + 3 \, x + 2\right ) + 297259 \, x + 228811}{120125 \,{\left (5 \, x^{2} + 3 \, x + 2\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.213602, size = 65, normalized size = 1.03 \begin{align*} \frac{4 x}{25} + \frac{8349 x + 7381}{19375 x^{2} + 11625 x + 7750} - \frac{22 \log{\left (x^{2} + \frac{3 x}{5} + \frac{2}{5} \right )}}{125} + \frac{41932 \sqrt{31} \operatorname{atan}{\left (\frac{10 \sqrt{31} x}{31} + \frac{3 \sqrt{31}}{31} \right )}}{120125} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18491, size = 70, normalized size = 1.11 \begin{align*} \frac{41932}{120125} \, \sqrt{31} \arctan \left (\frac{1}{31} \, \sqrt{31}{\left (10 \, x + 3\right )}\right ) + \frac{4}{25} \, x + \frac{121 \,{\left (69 \, x + 61\right )}}{3875 \,{\left (5 \, x^{2} + 3 \, x + 2\right )}} - \frac{22}{125} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]